package com.jxc.model.po;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/*
 * 代理商授权经销商记录
 */
@Entity
@Table(name = "QXGL_DEALER_GRANT_RECORD")
public class DealerGrantRecord extends IdEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 代理商
	 * 
	 */
	private User agency;
	/**
	 * 发起时间
	 */
	private Date initiationTime;
	/**
	 * 经销商
	 * 
	 */
	private User dealer;
	/**
	 * 是否授权
	 */
	private Boolean isGranted;
	/**
	 * 授权时间
	 */
	private Date grantTime;
	/**
	 * 是否删除
	 */
	private Boolean isDelete;
	
	@Column(name = "INITIATIONTIME")
	public Date getInitiationTime() {
		return initiationTime;
	}

	public void setInitiationTime(Date initiationTime) {
		this.initiationTime = initiationTime;
	}

	@Column(name = "GRANTTIME")
	public Date getGrantTime() {
		return grantTime;
	}

	public void setGrantTime(Date grantTime) {
		this.grantTime = grantTime;
	}

	@Column(name = "IS_GRANTED")
	public Boolean getIsGranted() {
		return isGranted;
	}

	public void setIsGranted(Boolean isGranted) {
		this.isGranted = isGranted;
	}

	@Column(name = "IS_DELETED")
	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AGENCY_ID")
	public User getAgency() {
		return agency;
	}

	public void setAgency(User agency) {
		this.agency = agency;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "DEALER_ID")
	public User getDealer() {
		return dealer;
	}

	public void setDealer(User dealer) {
		this.dealer = dealer;
	}

}
